package com.leng.common.constant;

/**
 * @author xialin.yan
 * @version V1.0.1
 * @projectName shop
 * @packageName cn.dental360.common.cache
 * @description 基础请求状态码
 * @email xiaolin.yan@dental360.cn
 * @date 2019/10/24 13:38
 **/
public enum ExceptionEnum {
    ERROR(500,"系统内部错误"),
    FAILED(-2,"操作失败"),
    PARAM_ERROR(1001, "参数错误"),
    USER_NOT_EXIST(1002,"用户不存在"),
    AGENT_NOT_EXIST(1003,"代理商不存在"),
    ERROR_404(404,"接口不存在"),
    ERROR_403(403,"未登录"),
    ERROR_401(401,"鉴权失败，请重新登录"),
    USER_NOT_SET_ROLE(402,"用户未分配权限"),
    DEVICE_STATUS_STOP_USING(1,"该设备暂时停止使用"),
    DEVICE_STATUS_UN_STORE(1,"该设备未在门店上线"),
    DEVICE_STATUS_UN_LINE(1,"该设备未在线请联系工作人员"),
    ;

    private int code;
    private String msg;

    ExceptionEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    private void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    private void setMsg(String msg) {
        this.msg = msg;
    }
}
